<template>
  <div class="nav">
    <h1 style="color: #409EFF">添加商品</h1>
    <el-button type="primary" @click="addBatch">批量添加</el-button>
    <el-button type="primary" @click="lookShoppingCart" icon="el-icon-s-goods">查看购物车</el-button>
    <template>
      <el-table
          :data="tableData"
          style="width: 100%"
          @selection-change="handleSelectionChange"
      >
        <el-table-column
            type="selection"
            width="55" align="center">
        </el-table-column>
        <el-table-column
            prop="id"
            label="商品编号"
            width="180" align="center">
        </el-table-column>
        <el-table-column
            prop="goodsName"
            label="商品名称"
            width="180" align="center">
        </el-table-column>
        <el-table-column
            prop="typeName"
            label="商品分类"
            width="180" align="center">
        </el-table-column>
        <el-table-column
            prop="brandName"
            label="商品品牌"
            width="180" align="center">
        </el-table-column>
        <el-table-column
            prop="modelId"
            label="商品型号"
            width="180" align="center">
        </el-table-column>
        <el-table-column
            prop="colourName"
            label="商品颜色"
            width="180" align="center">
        </el-table-column>
        <el-table-column
            prop="goodsImg"
            label="图标" align="center">
          <template v-slot="obj">
            <img :src="obj.row.goodsImg" height="35px">
          </template>
        </el-table-column>
        <el-table-column>
          <template v-slot="obj">
            <el-button
                type="primary"
                icon="el-icon-goods"
                circle
                :disabled="isDisabled"
                @click="addGood(obj.row)" ></el-button>
          </template>
        </el-table-column>
      </el-table>
    </template>
    <!--分页-->
    <div class="block">
      <el-pagination
          background
          layout="prev, pager, next"
          :total=total
          :current-page="this.searchParams.currentPage"
          :page-size="this.searchParams.pageSize"
          @current-change="currentPageChange"
          align="right">
      </el-pagination>
    </div>
    <el-button type="primary" @click="back">返回</el-button>
  </div>
</template>


<script>
import addOrder from "@/views/b2c/addOrder/addOrder";

export default addOrder
</script>

<style>
@import "addOrder.css";
</style>